package com.yuebook.reader.json;

import com.yuebook.base.common.dto.ResponseDTO;
import com.yuebook.base.common.utils.Propertyutils;
import com.yuebook.reader.common.utils.A;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author honglei
 * @date 2018/10/26 下午4:48
 */
@Controller
@RequestMapping(value = "base")
@Api(value = "baseAction", description = "测试action")
public class BaseAction {

    private Logger logger = LoggerFactory.getLogger(BaseAction.class);

    @RequestMapping(value = "hello", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "测试", notes = "ssssss")
    public ResponseDTO hello() {
        logger.info("hhhhhhhhhhhhhh..................");
        A.test();
        String springVersion = Propertyutils.getProperty("spring.version");
        return ResponseDTO.success(springVersion);
    }

}
